package com.lagou;

import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;


@SpringBootApplication
@EnableDubbo
public class AnnotationConsumerMain {
    public static void main(String[] args) {
        SpringApplication.run(AnnotationConsumerMain.class, args);

    }
//    public static void main(String[] args) throws IOException, InterruptedException {
//        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConsumerConfiguration.class);
//        context.start();
//        ConsumerComponent service = context.getBean(ConsumerComponent.class);
//        while (true) {
//            System.in.read();
//            try {
//                String hello = service.sayHello("world", 0);
//                System.out.println("result :" + hello);
//            } catch (Exception e) {
//                e.printStackTrace();
//            }
//        }
//    }
//
//    @Configuration
//    @PropertySource("classpath:/dubbo-consumer.properties")
//    //@EnableDubbo(scanBasePackages = "com.lagou.service")
//    @ComponentScan("com.lagou.service")
//    @EnableDubbo
//    static class ConsumerConfiguration {
//
//    }
}
